home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / LinAlg 3.1 / LinAlg / Makefile < prev    next >
Encoding:
Makefile  |  1995-12-21  |  2.1 KB  |  95 lines  |  [TEXT/unix]

  1. #                Makefile
  2. #     to build and test the Numerical Math Library (libla.a)
  3. #
  4. # To build the library, you may want to edit the list of the library modules
  5. # below (MODULES). Say, if you don't need/want FFT, remove all the names
  6. # that contain fft from MODULES= below. Then make the modules you left
  7. # into the library by
  8. #        make lib
  9. # simple 'make' would suffice, too.
  10. #
  11. # To verify the library, do
  12. #    make check-all
  13. # or, more specifically,
  14. #    make vmatrix        (checks elementary matrix operations)
  15. #    make vvector        (checks elementary vector operations)
  16. #    make vmatrix1        (checks advanced matrix operations: multipl)
  17. #    
  18. #    make vzeroin        (verifies Brent's 1D root finder)
  19. #    make vfminbr        (verifies Brent's 1D minimizer)
  20. #
  21. # Note, this Makefile was built (and works under) GNU make 3.71
  22. #
  23. # Please check RANLIB below and adjust it to your system if necessary
  24. # (it was made for a BSD-like system)
  25. #
  26. CC=./c++
  27. CCL=./c++l
  28. .SUFFIXES: .cc
  29. MODULES=myenv.cc matrix1.cc matrix2.cc matrix_sub.cc \
  30.     vector.cc determinant.cc matrix_inv.cc \
  31.     zeroin.cc fminbr.cc ali.cc hjmin.cc svd.cc
  32. #    fft_init.cc fft_input.cc fft_output.cc
  33. LIBRARY=libla.a
  34. #RANLIB = (ar d $(LIBRARY) __.SYMDEF || true); ranlib $(LIBRARY) ; BSD-like
  35. RANLIB=/bin/true        # SYSV-based
  36. #    Rules, new style
  37.  
  38. %.o : %.cc
  39.     $(CC) $*.cc
  40.  
  41. % : %.o $(LIBRARY)
  42.     $(CCL) $< $(LIBRARY) -o $@
  43.     ./$@
  44.  
  45. % :: %.cc
  46.     $(CC) $*.cc
  47.     $(CCL) $*.o $(LIBRARY) -o $@
  48.     ./$@
  49.  
  50. #    Rules, old style
  51. #.o:    $*.o $(LIBRARY)
  52. #    $(CCL) $*.o $(LIBRARY) -o $*
  53. #    ./$*
  54. #.cc:     $*.cc $(LIBRARY)
  55. #    $(CC) $*.cc
  56. #    $(CCL) $*.o $(LIBRARY) -o $*
  57. #    ./$*
  58. #.cc.o:
  59. #    $(CC) $*.cc
  60. #
  61.     
  62. # Primary goal
  63.  
  64. # Library
  65.  
  66. lib:    $(LIBRARY)
  67. .PHONY: lib
  68. .PRECIOUS:    $(LIBRARY)
  69.  
  70. $(LIBRARY)::    $(MODULES)
  71. #             Compile the source files that have been changed 
  72.     $(CC) $?
  73.     listobj=`echo $? | sed s/.cc/.o/g` ; \
  74.     ar rv $(LIBRARY) $$listobj &&    \
  75.     rm $$listobj
  76.     $(RANLIB)
  77.  
  78. # Verification routines
  79. check-all:    vmatrix vvector vmatrix1 vali vhjmin vfminbr vzeroin \
  80.         vsvd vslesing
  81.  
  82. #vmatrix1:    vmatrix1.o $(LIBRARY)
  83. #    $(CCL) vmatrix1.o $(LIBRARY) -o vmatrix1
  84. #    ./vmatrix1
  85.  
  86.  
  87. # Specific dependent goals
  88.  
  89.  
  90. # Dependence rules
  91.  
  92. $(LIBRARY)::    LinAlg.h
  93.     $(MAKE) -W matrix1.cc lib
  94. #vquadtree.o:    quadtree.h
  95.